// Menu.h: interface for the Menu class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MENU_H__493AB004_2D9C_40A2_AF58_F82C7CF95E93__INCLUDED_)
#define AFX_MENU_H__493AB004_2D9C_40A2_AF58_F82C7CF95E93__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "SubMenu.h"
#include "IconButton.h"

struct MenuEntry
{
IconButton *button;
SubMenu    *submenu;
};

class Menu  
{
public:
	Menu(float x, float y, int col, float icon_w, float icon_h);
	virtual ~Menu();

	int mouse(int button, int state, int x, int y);
	int passive(int button, int state, int x, int y);
	bool isFocused();
	
	void reveal();
	void hide();

	void display();

	bool isVisible();

	int getMenuEntry();
	int getSubMenuEntry();

	void add(MenuEntry *me);

	void bindTextures();

private:
	bool show;
	bool selected;
	bool focused;

	int cols;
	float start_x;
	float start_y;
	float icon_h;
	float icon_w;

	int old_sel;
	int curr_sel;

	int numMenuEntries;

	ulLinkedList *menuEntries;
};

#endif // !defined(AFX_MENU_H__493AB004_2D9C_40A2_AF58_F82C7CF95E93__INCLUDED_)
